home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- Global Const BLACK = &H0&
- Global Const WHITE = &HFFFFFF
- Global Const LTBLUE = &HFFFF00
- Global Const YELLOW = &HFFFF&
- Global Const RED = &HFF&
-
- Sub CenterForm (TGT As Form)
-
- TGT.Left = (Screen.Width - TGT.Width) / 2
- TGT.Top = (Screen.Height - TGT.Height) / 2
-
- End Sub
-
- Sub DrawChart (TGT As Form)
-
- TGT.ScaleTop = 0
- TGT.ScaleHeight = 100
- TGT.ScaleLeft = 0
- TGT.ScaleWidth = 100
-
- TGT!itgProcess.Top = 0
- TGT!itgProcess.Height = 80
- TGT!itgProcess.Left = 0
- TGT!itgProcess.Width = 100
-
- TGT!itgSubProcess.Top = 0
- TGT!itgSubProcess.Height = 80
- TGT!itgSubProcess.Left = 0
- TGT!itgSubProcess.Width = 100
-
- TGT!lblMessage.Top = 80
- TGT!lblMessage.Height = 20
- TGT!lblMessage.Left = 0
- TGT!lblMessage.Width = 100
-
- End Sub
-
- Sub Main ()
- On Error GoTo NoFile
- Dim FRM As Form
- Dim Msg$, Cap$, filenum%, temp&
-
- Set FRM = New frmProcess
-
- filenum = 1
- temp = FileLen(App.Path & "\process.itg")
- FRM!itgProcess.LoadFrom = App.Path & "\process.itg"
-
- filenum = 2
- temp = FileLen(App.Path & "\subproc.itg")
- FRM!itgSubProcess.LoadFrom = App.Path & "\subproc.itg"
-
- FRM.Width = 640 * Screen.TwipsPerPixelX
- FRM.Height = 480 * Screen.TwipsPerPixelY
-
- FRM!Pause.Caption = "&Pause"
-
- FRM!timTimer1.Interval = 1000
- FRM!Interval_onesec.Checked = True
- FRM!Interval_twosec.Checked = False
- FRM!Interval_foursec.Checked = False
-
- FRM!lblMessage = ""
- FRM!timTimer1.Enabled = False
- FRM!itgSubProcess.Visible = False
-
- Call CenterForm(FRM)
- Call DrawChart(FRM)
-
- FRM.Show
- Exit Sub
-
- NoFile:
- Cap = "MISSING GRAPH FILE"
- Msg = "Unable to locate the file"
- If filenum = 1 Then
- Msg = Msg & " ""process.itg,"" "
- Else
- Msg = Msg & " ""subproc.itg,"" "
- End If
- Msg = Msg & "which is required for this demonstration program. Please load this file "
- Msg = Msg & "into the same directory as this demonstration program's ""*.exe"" file."
- MsgBox Msg, 48, Cap
- End
-
- End Sub
-
-